package io.renren.modules.generator.dao;

import io.renren.modules.generator.entity.TTrainingCheckEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 考核信息表
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2019-08-07 13:58:40
 */
@Mapper
public interface TTrainingCheckDao extends BaseMapper<TTrainingCheckEntity> {

    /**
     * 新增  考核信息
     */
    int insertTTrainingCheck(TTrainingCheckEntity trainingCheckEntity);
    /**
     * 获取最新一条的数据
     */
    TTrainingCheckEntity getNewInfo();

    TTrainingCheckEntity selectByTrainingIdAndCount(@Param("trainingId") Integer trainingId,@Param("chenkCount")Integer chenkCount);

    List<TTrainingCheckEntity> selectByTrainingId(@Param("trainingId") Integer trainingId);

    int updateByPrimaryKeySelective(TTrainingCheckEntity trainingCheckEntity);



}
